Method for controlling masking block in monitoring camera

ABSTRACT

A method for controlling a masking block in a monitoring camera. The method adjusts the masking block to precisely hide an image of a subject with its position and size changed when a zoom magnification is changed under a state where the masking block is set. In addition, the method adjusts a masking block to precisely hide a changed image of a subject when the monitoring camera is rotated to change the position of the image of the subject. In addition, the method measures and corrects a distance between a center axis of a CCD and an optical axis of a lens if the two axes are not coincident with each other. In addition, the method corrects an offset occurring due to an incorrect coupling between the monitor camera and a pan/tilter. Furthermore, a method for setting a masking block when a remotely uncontrollable monitoring camera is used is disclosed.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a Continuation Application of prior U.S. patentapplication Ser. No. 10/992,083 filed Nov. 19, 2004, now U.S. Pat No.7,508,415 which claims priority under 35 U.S.C. §119 to KoreanApplication No. 10-2003-0082495 filed on Nov. 20, 2003, whose entiredisclosure is hereby incorporated by reference .

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a method for controlling a maskingblock overlapped to prevent a particular subject requiring privacyprotection from being exposed.

2. Description of the Related Art

Recently, with a digital video recorder (DVR) in common use, amonitoring camera installed at a place requiring security takes aphotograph of a subject to be monitored and image data of thephotographed subject can be stored in the DVR. However, since an imageof the subject photographed by the monitoring camera can also includefaces of unspecified individuals, denunciation on privacy infringementis being raised.

For the purpose of protecting privacies of the unspecified individuals,there has been proposed a method for displaying a masking block such asa mosaic image in an overlapped way. This method is a method foroverlapping an image including the masking block for hiding only asubject with privacy to be protected with the image of the subject to bemonitored (hereinafter referred to as “monitor image”).

FIG. 1 is a diagram illustrating a configuration of a general monitoringcamera 100 with its zoom magnification adjustable, including a zoom lens10, a focus lens 11, an iris 12, a charge couple device (CCD) 13, ananalog/digital (A/D) converter 14, a digital signal processor 15, acontroller 16, and a memory 18.

In addition, the monitoring camera 100 further includes a masking blockgenerator 17 for generating the masking block such as the mosaic imageto be overlapped to hide an image of a particular subject included in amonitor image.

As shown in FIG. 2, when privacy protection for a subject A of subjectsA, B, C, D and E, which are included in the monitor image to bephotographed in a state where zoom magnification is 1 (zoom state=×1) isrequired, the controller 16 controls operation of the masking blockgenerator 17 and the digital signal processor 15 such that a maskingblock of a certain size is overlapped with an image of the subjectaccording to a key input by a user.

More specifically, when the user specifies a start position coordinatevalue (Xs, Ys) and an end position coordinate value (Xe, Ye) of amasking block to be overlapped using a mouse or a directional key, thecontroller 16 controls the masking block generator 17 to generate themasking block corresponding to the specified coordinate values andcontrols the digital signal processor 15 to overlap the generatedmasking block with the monitor image such that the subject A included inthe monitor image is not displayed by the masking block.

In addition, for the purpose of photographing a place to be monitored atvarious angles, the monitoring camera 100 can be mounted on a pan/tilter200, which is an apparatus for rotating the monitoring camera 100vertically and horizontally, as shown in FIG. 3. The vertical rotationand the horizontal rotation are referred to as “tilting” and “panning”,respectively.

When the monitoring camera zooms in from ×1 to ×4 in zoom magnification,or is tilted vertically or panned horizontally, the size and/or positionof an image of the subject appearing in the monitor image are variedbetween after and before changing the zooming and, tilting and/orpanning.

However, under a condition where the masking block for hiding the imageof the particular subject included in the monitor image is overlappedwith the monitor image, when a zoom lens of the monitoring camera iszoomed and/or the monitoring camera is rotated by the pan/tilter 200such that the size and/or position of the subject appearing in themonitor image is changed, there is conventionally no method forprecisely hiding the particular subject with the changed size and/orposition by correspondingly changing the size and/or position of themasking block.

In addition, if the CCD 13 is not correctly mounted on a printed circuitboard (PCB), for example, when a center axis of the CCD 13 is notcoincident with an optical axis of the zoom lens due to an error in amanufacture process, as shown in FIG. 4, when the zoom magnification isincreased, the image of the subject A positioned at the center of themonitor image in FIG. 2 is deviated from the center of the monitor imagewhich is zoomed in while being enlarged in size. Accordingly, even whenthe size of the masking block is adjusted to correspond to the increasedzoom magnification, the masking block with the adjusted size cannotexactly hide the subject deviated from the center of the monitoringimage and appearing with its enlarged size.

As shown in FIG. 6, if the monitoring camera 100 is not correctlymounted on the center of the pan/tilter 200, a trace along which theimage of the subject A included in the monitor image photographed by themonitoring camera 100 actually moves by the panning or tilting becomesan abnormal trace different from a moving trace in a state where themonitoring camera 100 is correctly mounted on the center of thepan/tilter 200. Accordingly, even when the position of the masking blockis changed to correspond to a normal panning or tilting, the maskingblock with the changed position cannot exactly hide the subject movedalong the abnormal trace.

In addition, when the monitoring camera is powered off, sinceinformation on a set masking block is not stored, a problem arises inthat the user has to repeat a setting operation to display the maskingblock.

On the other hand, a remotely controllable monitoring camera can hide animage of a particular subject requiring protection of privacy as aremote user specifies the masking block using an input device such as amouse or a directional key prepared in the DVR to control the monitoringcamera. However, since there is conventionally no method for specifyingthe masking block for a remotely uncontrollable monitoring camera, therearises a problem of insufficient protection of privacy.

SUMMARY OF THE INVENTION

Therefore, the present invention has been made in view of the aboveproblems, and it is an object of the present invention to provide amethod for adjusting a masking block, which is capable of hiding animage of a subject with its position and size changed according to azoom in/out magnification and a panning/tilting rotation.

It is another object of the present invention to provide a method foradjusting a masking block, which is capable of following an image of asubject moving along an abnormal trace in a monitor image by a panningor a tilting even if the monitoring camera is not correctly mounted on apan/tilter.

It is yet another object of the present invention to provide a methodfor adjusting a masking block, which is capable of hiding an image of asubject appearing at an unexpected position by a zooming operation evenif an optical axis of a zoom lens of a monitoring camera is notcoincident with a center axis of a CCD.

It is yet another object of the present invention to provide a methodfor managing information on a masking block such that a set maskingblock can be precisely restored, when system power is turned off andthen turned on again later.

It is yet another object of the present invention to provide a methodfor setting a masking block for a remotely uncontrollable monitoringcamera.

In accordance with an aspect of the present invention, the above andother objects can be accomplished by the provision of a method forcontrolling a masking black in a monitoring camera, comprising the stepsof: (a) confirming a change of a zoom magnification and/or a change ofpanning or tilting conditions of the monitoring camera under a statewhere the masking block is set by a user; and (b) adjusting the maskingblock to correspond to the confirmed change.

Preferably, the masking block is a rectangular masking block or acircular masking block, the rectangular masking block is set byspecifying two diagonal vertexes of the masking block or specifying acenter of the masking block and displacements in an X axis and a Y axisfrom the center to a vertex of the masking block, and the circularmasking block is set by specifying two points to form a diameter of thecircular masking block or specifying a center and a radius of thecircular masking block. Preferably, the two specified points, or thecenter and the displacement are managed as information on the maskingblock.

Preferably, when the zoom magnification is changed, the position of themasking block is adjusted according to an equation of

${P_{2} = {{\frac{\left( {Z_{2} - Z_{1}} \right)}{Z_{1}} \times \left( {P_{1} - P_{C}} \right)} + P_{1}}},$and when the monitoring camera is panned or tilted, the position of themasking block is adjusted according to an equation of P₂ ^(X)=α_(X)^(T)×(A₂ ^(T)−A₁ ^(T))×Z_(C)+α_(X) ^(P)×(A₂ ^(P)−A₁ ^(P))×Z_(C)+P₁ ^(X),and P₂ ^(Y)=α_(Y) ^(T)×(A₂ ^(T)−A₁ ^(T))×Z_(C)+α_(Y) ^(P)×(A₂ ^(P)−A₁^(P))×Z_(C)+P₁ ^(Y).

Preferably, when a center axis of a CCD of the monitoring camera is notcoincident with an optical axis of a lens of the monitoring camera, aninteraxis offset is measured and stored according to an equation of

${P_{Off} = \frac{\left( {P_{M\; 2} - P_{M\; 1}} \right)}{\left( {{Z_{2}/Z_{1}} - 1} \right)}},$and when the zoom magnification is changed, the position of the maskingblock is adjusted by reflecting the interaxis offset according to anequation of

$\frac{\left( {Z_{2} - Z_{1}} \right)}{Z_{1}} \times {P_{Off}.}$

Preferably, when the monitoring camera is not correctly mounted on thepan/tilter, a pan/tilter offset is measured and stored, and when themonitoring camera is panned or tilted, the masking block is adjusted byreflecting the pan/tilter offset.

In accordance with another aspect of the present invention, the aboveand other objects can be accomplished by the provision of a method forsetting a masking block in a monitoring camera, comprising the steps of:generating a default masking block, overlapping the generated maskingblock with a monitor image and displaying the monitor image overlappedby the masking block on a screen, when an input device is operated by auser; storing information on a new masking block set by the user usingthe input device; and overlapping the new masking block having thestored information with the monitor image and displaying the monitorimage overlapped by the new masking block.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other subjects, features and other advantages of thepresent invention will be more clearly understood from the followingdetailed description taken in conjunction with the accompanyingdrawings, in which:

FIG. 1 is a diagram illustrating a configuration of a general monitoringcamera;

FIG. 2 is a diagram for explaining a procedure for generating a maskingblock to hide an image of a subject included in a monitor image andoverlapping the generated masking block with the monitor image;

FIG. 3 is a diagram illustrating a monitoring camera, which is mountedon a pan/tilter for rotating the monitoring camera vertically orhorizontally;

FIG. 4 is a diagram illustrating a case where a center axis of a CCD isnot coincident with an optical axis of a zoom lens;

FIG. 5 is a diagram illustrating a case where an image of a subjectpresented at the center of a monitor image is deviated from the centerof the monitor image while being enlarged in size when zoommagnification is increased under a state where a center axis of a CCD isnot coincident with an optical axis of a zoom lens;

FIG. 6 is a diagram illustrating a comparison between a case where amonitoring camera is correctly mounted on the center of a pan/tilter anda case where the monitoring camera is not correctly mounted on thecenter of the pan/tilter;

FIG. 7 is a diagram illustrating a combined structure of a monitoringcamera to which a masking block control method of the present inventionis applied and a pan/tilter;

FIG. 8 is a diagram illustrating that position and size of an image ofthe subject in a monitor image are changed according to a change in zoommagnification;

FIG. 9 is a diagram for explaining a method for calculating a distancebetween a center axis of a CCD and an optical axis of a zoom lens;

FIG. 10 is a flow chart illustrating one embodiment of the presentinvention in accordance with which a distance between a center axis of aCCD and an optical axis of a zoom lens is measured and corrected when itis determined that the center axis of the CCD is not coincident with theoptical axis of the zoom lens;

FIG. 11 is a flow chart illustrating another embodiment of the presentinvention in accordance with which an offset between an image of asubject and a masking block, which occurs by an incorrect couplingbetween a monitoring camera and a pan/tilter, is measured and corrected;and

FIG. 12 is a flow chart illustrating yet another embodiment of thepresent invention in accordance with which a masking block is set byusing key buttons prepared in a remotely uncontrollable monitoringcamera.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

Hereinafter, a method for controlling a masking block in a monitoringcamera according to preferred embodiments of the present invention willbe described in detail with reference to the accompanying drawings.

To begin with, a masking block of the present invention can be arectangular masking block in parallel with a frame of a monitor image ora circular masking block. A user can specify a left-top position and aright-bottom position, or a left-bottom position and a right-topposition on the monitor image to determine the position and size of therectangular masking block, or can specify two random positions on themonitor image to determine the circular masking block which diametercorresponds to a distance between the two positions, using a mouse andthe like.

In the case of the rectangular block, two positions forming a diagonalof the rectangular masking block, that is, the left-top position and theright-bottom position, or the left-bottom position and the right-topposition, can be managed as data for the masking block, or a centerposition of the rectangular masking block and a horizontal displacementand a vertical displacement from the center position of the rectangularmasking block to a vertex of the rectangular masking block can also bemanaged as data for the masking block. In the case of the circularmasking block, a center position of the circular masking block and aradius of the circular masking block can be managed as data for themasking block.

The masking control method according to the present invention isapplicable to the monitoring camera having the zoom lens as shown inFIG. 1. The A/D converter 14, the digital signal processor 15, thecontroller 16, and the memory 18, as shown in FIG. 1, may be included inthe monitoring camera 100, or alternatively, in a remote DVR.

In addition, the masking block control method for the panning andtilting is applicable to a combined structure of the monitoring camera100 and the pan/tilter 200 as shown in FIG. 7. Referring to FIG. 7, thepan/tilter 200 includes a tilt motor TM for rotating the monitoringcamera 100 vertically, a pan motor PM for rotating the monitoring camera100 horizontally, a pan/tilter driver 21 for driving the tilt motor TMand/or the pan motor PM to rotate the monitoring camera vertically andhorizontally according to an operation by the user or instructions fromthe controller 16 of the monitoring camera, and sending rotationconditions of the monitoring camera 100 to the controller 16, and aninterface 20 interfacing between the controller 16 and the pan/tilterdriver 21.

The controller 16 of the monitoring camera confirms variation of panningand tilting conditions from the rotation conditions of the monitoringcamera transmitted from the pan/tilter driver 21 and detects theposition of the zoom lens to confirm variation of zoom magnification.

Upon confirming the variation of the panning/tilting conditions and/orthe variation of the zoom magnification under a state where the maskingblock for hiding the image of the particular subject in the monitorimage is set, the controller 16 of the monitoring camera controls themasking block generator 17 to adjust the size and position of the setmasking block such that the set masking block can precisely hide theimage of the particular subject which is moved and/or magnified/reducedin the monitor image according to the variations of the confirmedpanning/tilting conditions and/or zoom magnification.

In addition, upon confirming the variations of the panning/tiltingconditions and/or zoom magnification, the controller 16 of themonitoring camera stores and manages data on the panning/tiltingconditions, the zoom magnification and the masking block in the memory18, for example, a nonvolatile memory such as an EEPROM. Accordingly,when the system is powered off, and powered on later, it can easilyrestore the masking block before it is powered off.

On the other hands, assuming that the zoom lens 10 and the focus lens 11composing the monitoring camera 100 is formed by one lens, a focallength in the case where the zoom magnification of the lens is ‘1’ is‘f’, a distance from the lens to the subject is ‘a’, and a distance froma real image formed at a side opposite to the subject through the lensto the lens is ‘b’, since ‘a’, ‘b’ and ‘f’ have a relationship of1/a+1/b=1/f, b=(a·f)/(a−f). Since the CCD 13 is placed between the lensand the real-image of the subject, the size of an image of the subjectformed on the CCD 13 is in proportion to the distance ‘b’. Also, sincethe focal length ‘f’ is typically even smaller than the distance ‘a’(a>>f), b≈(a·f)/a=f, showing that ‘b’ is in proportion to the focallength ‘f’. Accordingly, the size of the image formed on the CCD 13 isin proportion to the focal length ‘f’ of the lens.

When the zoom magnification of the lens becomes ‘n’ times andaccordingly the focal length ‘f’ becomes ‘nf’, since ‘nf’ is evensmaller than ‘a’ (a>>nf), b_(n)=(n·a·f)/(a−n·f)≈(n·a·f)/a=n·f, showingthat ‘b_(n)’ is nearly ‘n’ times as large as ‘b’ in the case of the zoommagnification of ‘1’. Accordingly, it can be generally assumed that thesize of the image formed on the CCD 13 is ‘n’ times increased when thezoom magnification becomes ‘n’.

Also, when the zoom magnification becomes ‘n’, the position of the imageof the subject in the monitor image is moved as well as the size of theimage of the subject in the monitor image is ‘n’ times increased. FIG. 8shows a monitor image obtained by zooming in and photographing thesubject, which is photographed with the zoom magnification of 1 in FIG.2, with zoom magnification of 4.

Referring to FIG. 8, the size of the image of the subject included inthe monitor image increases 4 times in proportion to the zoommagnification. Moreover, the position of the image of the subjectbecomes distant from the center of the monitor image. At this time, eachpixel composing the image of the subject included in the monitor imageof FIG. 8 with the zoom magnification of 4 is displayed at a positiondistant by 4 times from the center of the monitor image, compared toeach pixel composing the image of the subject included in the monitorimage of FIG. 2 with the zoom magnification of 1. Generally, when thezoom magnification becomes n, the image of the subject in the monitorimage becomes distant by n times from the center of the monitor image,compared to the image of the subject before the zoom magnification ischanged.

For example, when the zoom magnification is changed from Z₁ to Z₂, apoint P₁ within the monitor image with the zoom magnification of Z₁moves to a point P₂ within the monitor image with the zoom magnificationof Z₂. The point P₂ satisfies a relationship that

${P_{2} = {{\frac{Z_{2}}{Z_{1}} \times \left( {P_{1} - P_{C}} \right)} + P_{C}}},$where P_(C) denotes the center of the monitor image. Expressing P₂ by adifference value between P₂ and P₁,

$P_{2} = {{\frac{\left( {Z_{2} - Z_{1}} \right)}{Z_{1}} \times \left( {P_{1} - P_{C}} \right)} + {P_{1}.}}$Expressing P₂ for an X axis and a Y axis,

${P_{2}^{X} = {{\frac{\left( {Z_{2} - Z_{1}} \right)}{Z_{1}} \times \left( {P_{1}^{X} - P_{C}^{X}} \right)} + P_{1}^{X}}},$and

$P_{2}^{Y} = {{\frac{\left( {Z_{2} - Z_{1}} \right)}{Z_{1}} \times \left( {P_{1}^{Y} - P_{C}^{Y}} \right)} + {P_{1}^{Y}.}}$Also, the size of the image of the subject composed of points within themonitor image with the zoom magnification of Z₁ has a zoom ratio ofZ₂/Z₁.

Accordingly, the masking block set to hide the image of the subject inthe monitor image with the zoom magnification of Z₁ should be changedaccording to the above equations when the zoom magnification is changedto Z₂. In the case of the rectangular masking block, by transforming twopositions forming a diagonal of the rectangular masking block, that is,the left-top position and the right-bottom position, or the left-bottomposition and the right-top position, according to the above equations,or transforming a center point of the rectangular masking blockaccording to the same equations and multiplying a horizontaldisplacement and a vertical displacement from the center point of therectangular masking block to a vertex of the rectangular masking blockby a ratio of the zoom magnification, a new masking block correspondingto the changed zoom magnification is set. Similarly, in the case of thecircular masking block, by transforming a center point of the circularmasking block according to the same equations and multiplying a radiusof the circular masking block by the ratio of the zoom magnification, anew masking block corresponding to the changed zoom magnification isset.

Meanwhile, when the monitoring camera is vertically or horizontallyrotated by the pan/tilter, the image of the subject in the monitor imagemoves. It can be assumed that a movement displacement of the image ofthe subject by the rotation of the monitoring camera is in proportion toa rotation angle and a current zoom magnification. Accordingly, thepoint P₂ in the monitor image after the monitoring camera is rotated, atwhich the point P₁ in the monitor image before the monitoring camera isrotated is placed, can be expressed by the following equation.Expressing the P₂ for the X axis, P₂ ^(X)≅α_(X) ^(T)×(A₂ ^(T)−A₁^(T))×Z_(C)+α_(X) ^(P)×(A₂ ^(P)−A₁ ^(P))×Z_(C)+P₁ ^(X), where α_(X) ^(T)is a movement displacement in an X axis direction when the zoommagnification is 1 and the monitoring camera is tilted by a degree of 1,α_(X) ^(P) is a movement displacement in the X axis direction when thezoom magnification is 1 and the monitoring camera is panned by a degreeof 1, A₁ ^(T) and A₂ ^(T) are tilting angles before and after rotation,A₁ ^(P) and A₂ ^(P) are panning angles before and after rotation, andZ_(C) is a current zoom magnification. This is true of the Y axis.

When the zoom magnification is changed while the monitoring camera isrotated, a point (P₂=(P₂ ^(X),P₂ ^(Y))) in the monitor image afterchange of the zoom magnification and the rotation of the monitoringcamera, at which the point P₁ in the monitoring camera before the changeof the zoom magnification and the rotation of the monitoring camera isplaced, can be expressed by the following equation.

$P_{2}^{X} \cong {{\frac{\left( {Z_{2} - Z_{1}} \right)}{Z_{1}} \times \left( {P_{1}^{X} - P_{C}^{X}} \right)} + {\alpha_{X}^{T} \times \left( {A_{2}^{T} - A_{1}^{T}} \right) \times Z_{2}} + {\alpha_{X}^{P} \times \left( {A_{2}^{P} - A_{1}^{P}} \right)Z_{2}} + P_{1}^{X}}$$P_{2}^{Y} \cong {{\frac{\left( {Z_{2} - Z_{1}} \right)}{Z_{1}} \times \left( {P_{1}^{Y} - P_{C}^{Y}} \right)} + {\alpha_{Y}^{T} \times \left( {A_{2}^{T} - A_{1}^{T}} \right) \times Z_{2}} + {\alpha_{Y}^{P} \times \left( {A_{2}^{P} - A_{1}^{P}} \right)Z_{2}} + P_{1}^{Y}}$

where α_(X) ^(T) and α_(X) ^(P) are values calculated from a result of atest performed in advance and are stored in the memory 18 of themonitoring camera 100 in advance.

Accordingly, when the zoom magnification and/or the tilting/panningconditions are changed under the state where the masking block is set,by changing the set masking block according to the above equation, theimage of the subject in the monitor image which is moved and/orenlarged/reduced can be precisely hidden.

In the meantime, when the zoom magnification of the monitoring camera ischanged under the state where the masking block is set, the controller16 of the monitoring camera controls the masking block generator 17 toadjust the size and position of the masking block to correspond to thechanged zoom magnification. At this time, if the adjusted masking blockis deviated from the image of the subject with the position and sizechanged according to the change of the zoom magnification, andaccordingly, cannot precisely hide the image of the subject, thecontroller 16 determines that the center axis of the CCD 13 is notcoincident with the optical axis of the lens. Namely, it is determinedthat the CCD 13 is not correctly mounted on the printed circuit board orthe lens is not precisely aligned in the course of assembly of themonitoring camera 100.

FIG. 9 is a diagram for explaining a method for calculating a distancebetween the center axis of the CCD and the optical axis of the lens.Referring to FIG. 9, first, it is assumed that the center P_(CC) of theCCD is spaced apart by P_(off) from the optical axis P_(OC) of the lens(P_(CC)=P_(OC)+P_(off)). When the image of the subject is placed on thecenter of the monitor image and the monitoring camera zooms in to changethe zoom magnification from Z₁ to Z₂ under the state where the maskingblock to hide the image of the subject is set, the image of the subjectis zoomed in with the optical axis of the lens as a center. Accordingly,the center of the image of the subject, which is zoomed in and henceenlarged, moves to a point P_(ZC) rather than the center P_(CC) of theCCD. However, although a masking block MB1 which is adjusted accordingto the change of the zoom magnification is changed in size, its centeris not changed. Subsequently, the user sets a new masking block to hidethe image of the subject with its center moved to the point P_(ZC).

Herein, since a relationship thatZ₂/Z₁:1=n:1(P_(Off)+P_(ZC)−P_(CC)):P_(Off) is established, the distanceP_(off) between the center of the CCD and the optical axis of the lenscan be obtained by an equation of

$P_{Off} = {\frac{\left( {P_{ZC} - P_{CC}} \right)}{\left( {{Z_{2}/Z_{1}} - 1} \right)}.}$In the equation for obtaining the distance P_(off), since it is not easyto directly obtain the center P_(ZC) of the image of the subject,(P_(ZC)−P_(CC)) is obtained by other methods. (P_(ZC)−P_(CC)) iscoincident with a difference (P_(M2)−P_(M1)) between a vertex PM1 of themasking block BM1 with its size adjusted and a vertex PM2 of the newmasking block RM2 corresponding to the vertex PM1. Accordingly, thedistance P_(off) can be also obtained by an equation of

$P_{Off} = {\frac{\left( {P_{M\; 2} - P_{M\; 1}} \right)}{\left( {{Z_{2}/Z_{1}} - 1} \right)}.}$

On the other hand, the point P₁ composing the image of the subject iszoomed in from Z₁ to Z₂ with the optical axis P_(OC) as a center to moveto the point P₂ satisfying the following equation.

$\begin{matrix}{P_{2} = {{\frac{Z_{2}}{Z_{1}} \times \left( {P_{1} - P_{OC}} \right)} + P_{OC}}} \\{{= {{\frac{Z_{2}}{Z_{1}} \times \left( {P_{1} - P_{CC}} \right)} + P_{CC} + {\frac{\left( {Z_{2} - Z_{1}} \right)}{Z_{1}} \times P_{Off}}}},\;{or}} \\{P_{2} = {{\frac{\left( {Z_{2} - Z_{1}} \right)}{Z_{1}} \times \left( {P_{1} - P_{CC}} \right)} + P_{1} + {\frac{\left( {Z_{2} - Z_{1}} \right)}{Z_{1}} \times P_{Off}}}}\end{matrix}$

Accordingly, when the masking block MB1 with its size adjusted moves by

${\frac{\left( {Z_{2} - Z_{1}} \right)}{Z_{1}} \times P_{Off}},$the image of the subject with its center moved to the point P_(ZC) canbe precisely hidden.

FIG. 10 is a flow chart illustrating one embodiment of the presentinvention in accordance with which the distance between the center axisof the CCD and the optical axis of the lens, that is, an interaxisoffset value, is measured and corrected when it is determined that thecenter axis of the CCD is not coincident with the optical axis of thelens.

First, the controller 16 of the monitoring camera causes a user to set amasking block to hide an image of a subject under a state where zoommagnification is 1 -and the image of the subject is placed on the centerof a monitor image (S10). After the masking block is set, the controller16 controls the monitoring camera to zoom in to have the zoommagnification of n (S11) and controls the masking block generator 17 toadjust the size of the masking block to correspond to the zoommagnification of n (S12).

Subsequently, the controller 16 requests the user to confirm whether theadjusted masking block precisely hides the image of the subject changedaccording to the change of the zoom magnification (S13). If the adjustedmasking block precisely hides the changed image of the subject, that is,the image of the subject is changed in size, not in position with thechange of the zoom magnification, it is determined that the center axisof the CCD is coincident with the optical axis of the lens, andaccordingly, the interaxis offset value is specified as zero (S14).

On the contrary, if the adjusted masking block does not precisely hidethe changed image of the subject, that is, the image of the subject,which was placed on the center of the monitor image, is not only changedin size, but also moves to a point other than the center of the monitorimage, it is determined that the center axis of the CCD is notcoincident with the optical axis of the lens (S15), and the user isrequested to set a new masking block to precisely hide the image of thesubject with its position changed (S16). At this time, the user isprovided with information on the size of the masking block adjusted inthe step (S12) and is requested to set the size of the new masking blockto be equal to the size of the adjusted masking block.

When the new masking block to precisely hide the changed image of thesubject is set by the user (S17), the controller 16 compares informationon the masking block adjusted in step S12 with information on the newmasking block set in step S17, for example, compares positions of thecenters or vertexes of the two masking blocks each other, calculates aninteraxis offset value from a difference value between the positions,and stores the calculated interaxis offset value in the memory 18 (S18).

Subsequently, upon confirming the change of the zoom magnification ofthe monitoring camera 100 (S19), the controller 16 compensates for adifference in position between the image of the subject and the maskingblock due to a discrepancy between the center axis of the CCD and theoptical axis of the lens, using the interaxis offset value read from thememory 18 when the masking block is adjusted (S20).

On the other hand, upon confirming that the monitoring camera is tiltedor panned under the state where the masking block is set, the controller16 of the monitoring camera controls the masking block generator 17 toadjust the position of the masking block to correspond to the change ofthe tilting or panning conditions. If the masking block with itsposition adjusted cannot precisely hide the image of the subject withits position changed according to the change of the tilting or panningconditions, the controller 16 determines that the monitoring camera 100is not correctly mounted on the center of the pan/filter 200.

FIG. 11 is a flow chart illustrating another embodiment of the presentinvention in accordance with which an offset between the image of thesubject and the masking block, which occurs by an incorrect couplingbetween the monitoring camera and the pan/tilter, is measured andcorrected.

First, the controller 16 of the monitoring camera causes the user to setthe masking block to hide the image of the subject in the monitor block(S30). When the masking bloc is set, the controller 16 instructs thepan/tilter driver 21 to drive the pan motor PM or the tilt motor TM suchthat the monitoring camera 100 is rotated by a certain degree of angle,for example, a degree of 1, in the panning direction or the tiltingdirection (S31), and simultaneously, the position of the masking blockis adjusted according to the rotation of the monitoring camera (S32).

Subsequently, the controller 16 requests the user to confirm whether theadjusted masking block precisely hides the image of the subject with itsposition changed according to the rotation of the monitoring camera(S33). If the adjusted masking block precisely hides the image of thesubject with its position changed, it is determined that the monitoringcamera 100 is correctly mounted on the center of the pan/tilter 200, anda pan/tilter offset is specified as zero (S34).

On the contrary, if the adjusted masking block does not precisely hidethe image of the subject with its position changed, it is determinedthat the monitoring camera 100 is not correctly mounted on the center ofthe pan/tilter 200 (S35), and the user is requested to set a new maskingblock to precisely hide the image of the subject with its positionchanged (S36). At this time, since there is no variation of the zoommagnification of the monitoring camera, the user is provided withinformation on the size of an existing masking block and is requested toset the size of the new masking block to be equal to the size of theexisting masking block.

When the new masking block to precisely hide the image of the subjectwith its position changed is set by the user (S37), the controller 16compares information on the masking block adjusted in step S32 withinformation on the new masking block set in step S37, for example,compares positions of the centers of the two masking blocks each other,calculates a difference value between the positions, and stores thecalculated difference value as a pan or tilt offset value in the memory18 (S38).

Subsequently, upon confirming the change of the panning or tiltingconditions of the monitoring camera 100 (S39), the controller 16compensates for a difference in position between the image of thesubject and the masking block due to an incorrect coupling between themonitoring camera and the pan/tilter, using the pan or tilt offset valueread from the memory 18 when the masking block is adjusted (S40).

Meanwhile, if the monitoring camera 100 as shown in FIGS. 1 and 7 cannotbe controlled in a remote site, the masking block can be set by using aplurality of key buttons basically provided in the monitoring camera.The plurality of key button may include directional buttons in additionto buttons specified for setting the masking block.

FIG. 12 is a flow chart illustrating an embodiment where the maskingblock is set using key buttons prepared in a remotely uncontrollablemonitoring camera.

First, when a key button specified for setting the masking block (S50)is pressed, the controller 16 enters a ‘masking block setting mode’(S51), controls the masking block generator 17 to generate the maskingblock with an attribute, such as color, pattern, shape or size, which isset by a default, in the center of the monitor image, and controls thedigital signal processor 15 to overlap the generated masking block withthe monitor image to be photographed and display the monitor imageoverlapped by the masking block on a screen (S52).

The user confirms the default attribute of the masking block, andspecifies the position and/or size of the masking block to hide theimage of the subject included in the monitor image and changes theattribute such as color, pattern and/or shape of the masking block,using the key button and the directional buttons specified for settingthe masking block (S53).

The controller 16 stores the attribute of the masking block specified bythe user in the memory (S54), controls the masking block generator 17 togenerate a masking block with the attribute newly specified by the user,and controls the digital signal processor 15 to overlap the generatedmasking block with the monitor image and display the monitor image onthe screen (S55).

As apparent from the above description, the present invention provides amethod for adjusting a masking block, which is capable of preciselyhiding an image of a subject with its position and size changedaccording to a change of zoom magnification and a panning/tiltingrotation.

In addition, the present invention provides a method for adjusting amasking block, which is capable of precisely hiding an image of asubject moving along an abnormal trace in a monitor image by a panningor a tilting even if the monitoring camera is not correctly mounted on apan/tilter.

In addition, the present invention provides a method for adjusting amasking block, which is capable of precisely hiding an image of asubject appearing at an unexpected position by a zooming operation evenif an optical axis of a lens of a monitoring camera is not coincidentwith a center axis of a CCD.

In addition, the present invention provides a method for managinginformation on a masking block, which is capable of precisely restoringa set masking block, when system power is turned off and turned onlater.

Furthermore, the present invention provides a method for setting amasking block for a remotely uncontrollable monitoring camera.

Although the preferred embodiments of the present invention have beendisclosed for illustrative purposes, those skilled in the art willappreciate that various modifications, additions and substitutions arepossible, without departing from the scope and spirit of the inventionas disclosed in the accompanying claims.

1. Apparatus for controlling a masking block in a monitoring camera, theapparatus comprising: a masking block generator configured to generate amasking block; and a controller in communication with the masking blockgenerator and configured to receive a change of at least one of a zoommagnification information or a change of panning or tilting informationof the monitoring camera, adjust the masking block to correspond to theconfirmed received information, and further adjust the masking block tocorrespond to the change of the zoom magnification by reflecting aninteraxis offset occurring when a center axis of a CCD of the monitoringcamera is not coincident with an optical axis of a lens of themonitoring camera, wherein the interaxis offset comprises a differencein position between an image of a subject and the masking block due to adiscrepancy between the center axis of the CCD and the optical axis ofthe lens of the monitoring camera.
 2. The apparatus as set forth inclaim 1, further comprising a memory configured to store the receivedinformation.
 3. The apparatus as set forth in claim 2, wherein thememory comprises a non-volatile memory.
 4. The apparatus as set forth inclaim 1, wherein the masking block is a rectangular masking block or acircular masking block.
 5. The apparatus as set forth in claim 4,wherein the controller determines a position and size of the rectangularmasking block by specifying two vertexes to form a diagonal of therectangular masking block by the user or specifying a center of therectangular masking block and vertical and horizontal displacements fromthe center to a vertex of the rectangular masking block by the user. 6.The apparatus as set forth in claim 5, wherein, when the masking blockis the rectangular masking block, the controller manages information onthe position and size of the rectangular masking block as data on thetwo vertexes to form the diagonal of the rectangular masking block ordata on the center of the rectangular masking block and the vertical andhorizontal displacements from the center to the vertex of therectangular masking block.
 7. The apparatus as set forth in claim 4,wherein the controller determines a position and size of the circularmasking block by specifying two points to form a diameter of thecircular masking block by the user or specifying a center and a radiusof the circular masking block by the user.
 8. The apparatus as set forthin claim 7, wherein, when the masking block is the circular maskingblock, the controller manages information on the position and size ofthe circular masking block as data on the two points to form thediameter of the circular masking block or data on the center and theradius of the circular masking block.
 9. The apparatus as set forth inclaim 1, wherein, when the change of the zoom magnification from Z₁ toZ₂ is confirmed, the controller adjusts the masking block in terms ofinformation on a size and position of the masking block according toequations of $\frac{Z_{2}}{Z_{1}}$ and${P_{2} = {{\frac{Z_{2} - Z_{1}}{Z_{1}} \times \left( {P_{1} - P_{C}} \right)} + P_{1}}},$respectively, where P₁is a point in a monitor image with the zoommagnification of Z₁, and P₂is a point in the monitor image with the zoommagnification of Z₂, corresponding to the point P₁, and P_(C) is acenter point of the monitor image.
 10. The apparatus as set forth inclaim 1, wherein the controller is further configured to increase thezoom magnification of the monitoring camera by a certain ratio under astate in which the masking block is set to hide an entire image of asubject placed on a center of the monitor image and confirm whether thecenter axis of the CCD of the monitoring camera is coincident with theoptical axis of the lens of the monitoring camera by confirming whetherthe masking block adjusted to correspond to the increase of the zoommagnification hides the entire image of the subject enlarged by theincrease of the zoom magnification, and when it is confirmed that thecenter axis of the CCD of the monitoring camera is not coincident withthe optical axis of the lens of the monitoring camera, set a new maskingblock to hide the entire image of the subject enlarged by the increaseof the zoom magnification, and calculate and store the interaxis offsetbased on a difference in position between the new masking block and themasking block with the adjusted size.
 11. The apparatus as set forth inclaim 10, wherein the calculated interaxis offset (P_(off)) is obtainedby:${P_{Off} = \frac{\left( {P_{M\; 2} - P_{M\; 1}} \right)}{\left( {{Z_{2}/Z_{1}} - 1} \right)}},$and a displacement of the masking block to be further moved is obtainedby: ${\frac{\left( {Z_{2} - Z_{1}} \right)}{Z_{1}} \times P_{Off}},$where, Z₁is a zoom magnification before change of the zoommagnification, and Z₂is a current zoom magnification after change of thezoom magnification, P_(M1)is a point of the masking block with the sizeadjusted, and P_(M2)is a point of the new masking block set,corresponding to the P_(M1).
 12. The apparatus as set forth in claim 1,wherein, when the change of the panning and/or tilting conditions isconfirmed, the controller adjusts the masking block in terms ofinformation on positions on an X axis and a Y axis, respectively,according to the following equations:P ₂ ^(X)=α_(X) ^(T)×(A ₂ ^(T) −A ₁ ^(T))×Z _(C)+α_(X) ^(P)×(A ₂ ^(P) −A₁ ^(P))×Z _(C) +P ₁ ^(X), andP ₂ ^(Y)=α_(Y) ^(T)×(A ₂ ^(T) −A ₁ ^(T))×Z _(C)+α_(Y) ^(P)×(A ₂ ^(P) −A₁ ^(P))×Z _(C) +P ₁ ^(Y) where, P₁ ^(X) and P₁ ^(Y) are positions on anX axis and a Y axis of points in the monitor image before panning and/ortilting, respectively, P₂ ^(X) and P ₂ ^(Y) are positions on an X axisand a Y axis of points in the monitor image after panning and/ortilting, respectively, corresponding to P₁ ^(X) and P₁ ^(Y), α_(X) ^(T)and α_(Y) ^(T) are movement displacements in an X axis direction and a Ydirection when the zoom magnification is 1 and a tilting angle is adegree of 1, respectively, A_(X) ^(P) and A_(Y) ^(P) are movementdisplacements in an X axis direction and a Y direction when the zoommagnification is 1 and a panning angle is a degree of 1, respectively,A₁ ^(T) and A₂ ^(T) are tilting angles before and after rotation,respectively, and A₁ ^(P) and A₂ ^(P) are panning angles before andafter rotation, and ZC is a current zoom magnification.
 13. Theapparatus as set forth in claim 12, wherein α_(X) ^(T), α_(Y) ^(T),α_(X) ^(P) and α_(Y) ^(P) are values calculated from a result of a testperformed in advance and are stored in a memory in advance.
 14. Theapparatus as set forth in claim 1, wherein the controller is configuredto further adjust the masking block adjusted to correspond to the changeof at least one of the panning and the tilting conditions by reflectinga pan/tilt offset occurring due to an incorrect mounting of themonitoring camera on a pan/tilter.
 15. The apparatus as set forth inclaim 14, wherein the controller is further configured to rotate themonitoring camera in a panning or tilting direction by a certain angleunder a state in which the masking block is set to hide an entire imageof a subject in the monitor image and confirm whether the monitoringcamera is correctly mounted on the pan/tilter by confirming whether themasking block with the position adjusted to correspond to the rotationof the monitoring camera hides the entire image of the subject moved bythe rotation, and when it is confirmed that the monitoring camera is notcorrectly mounted on the pan/tilter, set a new masking block to hide theentire image of the subject moved by the rotation, and calculate andstore the pan/tilt offset based on a difference in position between thenew masking block and the masking block with the adjusted position. 16.The apparatus as set forth in claim 1, wherein, when the change of thezoom magnification and at least one of the panning and tilting conditionis confirmed, the controller adjusts the masking block in terms ofinformation on sizes and positions on an X axis and a Y axis,respectively, according to the following equations: $\begin{matrix}{P_{2}^{X} = {{\frac{\left( {Z_{2} - Z_{1}} \right)}{Z_{1}} \times \left( {P_{1}^{X} - P_{C}^{X}} \right)} + {\alpha_{X}^{T} \times \left( {A_{2}^{T} - A_{1}^{T}} \right) \times}}} \\{Z_{2} + {\alpha_{X}^{P} \times \left( {A_{2}^{P} - A_{1}^{P}} \right) \times Z_{2}} + P_{2}^{X}} \\{P_{2}^{X} = {{\frac{\left( {Z_{2} - Z_{1}} \right)}{Z_{1}} \times \left( {P_{1}^{Y} - P_{C}^{Y}} \right)} + {\alpha_{X}^{Y} \times \left( {A_{2}^{T} - A_{1}^{T}} \right) \times}}} \\{{{Z_{2} + {\alpha_{X}^{P} \times \left( {A_{2}^{P} - A_{1}^{P}} \right) \times Z_{2}} + P_{2}^{Y}},\;{{and}\mspace{14mu}\frac{Z_{2}}{Z_{1}}}}\;}\end{matrix}$ where, P₁ ^(X) and P₁ ^(Y) are positions on an X axis anda Y axis of points in the monitor image before changing, respectively,P₂ ^(X) and P₂ ^(Y) are positions on an X axis and a Y axis of points inthe monitor image after changing, respectively, corresponding to P₁ ^(X)and P₁ ^(Y), α_(X) ^(T) and α_(Y) ^(T) are movement displacements in anX axis direction and a Y direction when the zoom magnification is 1 anda tilting angle is a degree of 1, respectively, α_(X) ^(P) and α_(Y)^(P) are movement displacements in an X axis direction and a Y directionwhen the zoom magnification is 1 and a panning angle is a degree of 1,respectively, A₁ ^(T) and A₂ ^(T) are tilting angles before and afterrotation, respectively, A₁ ^(P) and A₂ ^(P) are panning angles beforeand after rotation, and Z₁ is a zoom magnification before changing, andZ2 is a current zoom magnification after changing.
 17. The apparatus asset forth in claim 16, wherein α_(X) ^(T), α_(Y) ^(T), α_(X) ^(P) andα_(Y) ^(P) are values calculated from a result of a test performed inadvance and are stored in a memory in advance.
 18. A monitoring cameracomprising the apparatus of claim
 1. 19. Apparatus for controlling amasking block in a monitoring camera, the apparatus comprising: a maskblock generator configured to generate a masking block; and a controllerin communication with the masking block generator and configured todetermine an offset value between a position of the masking block and anadjusted masking block position to compensate for a discrepancy thatoccurs as zoom magnification is changed, and store the offset value,wherein the offset value is used to adjust the masking block position,and wherein the offset value comprises a difference in position betweenan image of a subject and the masking block due to a discrepancy betweena center axis of a CCD and an optical axis of a lens of the monitoringcamera.
 20. The apparatus as set forth in claim 19, further comprising amemory configured to store the offset value.
 21. The apparatus as setforth in claim 20, wherein the memory comprises a nonvolatile memory.22. The apparatus as set forth in claim 19, wherein the controllercontrols the mask block generator to generate a masking block to hide animage of a subject changed according to a change of at least one of thezoom magnification and panning or tilting conditions.
 23. The apparatusas set forth in claim 22, wherein, when a masking block does notprecisely hide the image of the subject changed according to the changeof the at least one zoom magnification and panning or tiltingconditions, then a user is requested to set a new masking block toprecisely hide the image of the subject.
 24. A monitoring cameracomprising the apparatus of claim
 19. 25. Apparatus for controlling amasking block in a monitoring camera, comprising: a masking blockgenerator that generates a masking block; and a controller incommunication with the masking block generator and configured to receivemonitoring camera control data, and adjust the masking block based on anoffset value and the control data, wherein the offset value comprises adifference in position between an image of a subject and the maskingblock due to an incorrect coupling between a monitoring camera and apan/titter.
 26. The apparatus as set forth in claim 25, furthercomprising a memory configured to store the offset value and the controldata.
 27. The apparatus as set forth in claim 26, wherein the memorycomprises a nonvolatile memory.
 28. The apparatus as set forth in claim25, wherein the control data includes zoom, panning, and/or tiltingcommands of the camera.
 29. The apparatus as set forth in claim 28,wherein the zoom command changes zoom magnification N times, the panningand tilting commands change a monitoring camera angle, and the offsetvalue comprises a difference in position between the image of thesubject and the masking block due to a discrepancy between a center axisof a CCD and an optical axis of a lens of the camera.
 30. A monitoringcamera comprising the apparatus of claim
 25. 31. A monitoring camerawith pan/filter, comprising: a zoon lens; a zoom driver configured todrive the zoom lens; a pan/tilter configured to rotate the monitoringcamera vertically and horizontally; a pan/filter driver configured todrive the pan/tilter; a masking block generator configured to generate amasking block; a controller in communication with the masking blockgenerator, the zoom driver, and the pan/tilter driver, and configured toreceive a change of at least one of a zoom magnification information ora change of panning or tilting information of the monitoring camera,adjust the masking block to correspond to the confirmed receivedinformation, and further adjust the masking block to correspond to thechange of the zoom magnification by reflecting an interaxis offsetoccurring when a center axis of a CCD of the monitoring camera is notcoincident with an optical axis of a lens of the monitoring camera,wherein the interaxis offset comprises a difference in position betweenan image of a subject and the masking block due to a discrepancy betweenthe center axis of the CCD and the optical axis of the lens of themonitoring camera.
 32. The monitoring camera with pan/tilter as setforth in claim 31, further comprising a memory configured to store thereceived information.
 33. The monitoring camera with pan/tilter as setforth in claim 32, wherein the memory comprises a non-volatile memory.34. The monitoring camera with pan/tilter as set forth in claim 31,wherein the controller communicates with the pan/tilter driver via aninterface.
 35. The monitoring camera with pan/tilter as set forth inclaim 31, further comprising at least one user interface.